package cn.itheima.health.demo;

import java.util.Timer;
import java.util.TimerTask;

public class TimerDemo {

    public static void main(String[] args) {

        //   Timer

        Timer  timer = new Timer();

        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("----running-----");
            }
        },5000,2000);

    }
}
